package com.atguigu07._abstract.exer2;

/**
 * ClassName: SalariedEmployeee
 * Package: com.atguigu07._abstract.exer2
 * Description:
 *
 * @Author xiao_qi
 * @Create 2024/9/3 20:58
 * @Version 1.0
 */
public class SalariedEmployee extends Employee{
    private double monthlySalary;//月工资
    public SalariedEmployee() {
        super();
    }

    @Override
    public int earnings() {
        return (int) monthlySalary;
    }
    public SalariedEmployee(String name, int number, MyDate birthday, double monthlySalary) {
        super();
        this.monthlySalary = monthlySalary;
    }

    @Override
    public String toString() {
        return "SalariedEmployee[" + super.toString() + "]";
    }
}
